<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>NodeTraversal (Closure Compiler)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="NodeTraversal (Closure Compiler)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/google/javascript/jscomp/MessageFormatter.html" title="interface in com.google.javascript.jscomp"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/google/javascript/jscomp/NodeTraversal.AbstractNodeTypePruningCallback.html" title="class in com.google.javascript.jscomp"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/google/javascript/jscomp/NodeTraversal.html" target="_top">Frames</a></li>
<li><a href="NodeTraversal.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.google.javascript.jscomp</div>
<h2 title="Class NodeTraversal" class="title">Class NodeTraversal</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.google.javascript.jscomp.NodeTraversal</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">NodeTraversal</span>
extends java.lang.Object</pre>
<div class="block">NodeTraversal allows an iteration through the nodes in the parse tree,
 and facilitates the optimizations on the parse tree.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.AbstractNodeTypePruningCallback.html" title="class in com.google.javascript.jscomp">NodeTraversal.AbstractNodeTypePruningCallback</a></strong></code>
<div class="block">Abstract callback to visit a pruned set of nodes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.AbstractPostOrderCallback.html" title="class in com.google.javascript.jscomp">NodeTraversal.AbstractPostOrderCallback</a></strong></code>
<div class="block">Abstract callback to visit all nodes in postorder.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.AbstractPreOrderCallback.html" title="class in com.google.javascript.jscomp">NodeTraversal.AbstractPreOrderCallback</a></strong></code>
<div class="block">Abstract callback to visit all nodes in preorder.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.AbstractScopedCallback.html" title="class in com.google.javascript.jscomp">NodeTraversal.AbstractScopedCallback</a></strong></code>
<div class="block">Abstract scoped callback to visit all nodes in postorder.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.AbstractShallowCallback.html" title="class in com.google.javascript.jscomp">NodeTraversal.AbstractShallowCallback</a></strong></code>
<div class="block">Abstract callback to visit all nodes but not traverse into function
 bodies.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.AbstractShallowStatementCallback.html" title="class in com.google.javascript.jscomp">NodeTraversal.AbstractShallowStatementCallback</a></strong></code>
<div class="block">Abstract callback to visit all structure and statement nodes but doesn't
 traverse into functions or expressions.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.Callback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.Callback</a></strong></code>
<div class="block">Callback for tree-based traversals</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.FunctionCallback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.FunctionCallback</a></strong></code>
<div class="block">Callback for passes that iterate over a list of functions</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.ScopedCallback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.ScopedCallback</a></strong></code>
<div class="block">Callback that also knows about scope changes</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../com/google/javascript/jscomp/DiagnosticType.html" title="class in com.google.javascript.jscomp">DiagnosticType</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#NODE_TRAVERSAL_ERROR">NODE_TRAVERSAL_ERROR</a></strong></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#NodeTraversal(com.google.javascript.jscomp.AbstractCompiler, com.google.javascript.jscomp.NodeTraversal.Callback)">NodeTraversal</a></strong>(<a href="../../../../com/google/javascript/jscomp/AbstractCompiler.html" title="class in com.google.javascript.jscomp">AbstractCompiler</a>&nbsp;compiler,
             <a href="../../../../com/google/javascript/jscomp/NodeTraversal.Callback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.Callback</a>&nbsp;cb)</code>
<div class="block">Creates a node traversal using the specified callback interface.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#NodeTraversal(com.google.javascript.jscomp.AbstractCompiler, com.google.javascript.jscomp.NodeTraversal.Callback, com.google.javascript.jscomp.ScopeCreator)">NodeTraversal</a></strong>(<a href="../../../../com/google/javascript/jscomp/AbstractCompiler.html" title="class in com.google.javascript.jscomp">AbstractCompiler</a>&nbsp;compiler,
             <a href="../../../../com/google/javascript/jscomp/NodeTraversal.Callback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.Callback</a>&nbsp;cb,
             com.google.javascript.jscomp.ScopeCreator&nbsp;scopeCreator)</code>
<div class="block">Creates a node traversal using the specified callback interface
 and the scope creator.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/AbstractCompiler.html" title="class in com.google.javascript.jscomp">AbstractCompiler</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#getCompiler()">getCompiler</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.google.javascript.jscomp.ControlFlowGraph&lt;<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#getControlFlowGraph()">getControlFlowGraph</a></strong>()</code>
<div class="block">Gets the control flow graph for the current JS scope.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#getCurrentNode()">getCurrentNode</a></strong>()</code>
<div class="block">Returns the node currently being traversed.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#getEnclosingFunction()">getEnclosingFunction</a></strong>()</code>
<div class="block">Examines the functions stack for the last instance of a function node.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/CompilerInput.html" title="class in com.google.javascript.jscomp">CompilerInput</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#getInput()">getInput</a></strong>()</code>
<div class="block">Gets the current input source.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#getLineNumber()">getLineNumber</a></strong>()</code>
<div class="block">Gets the current line number, or zero if it cannot be determined.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/JSModule.html" title="class in com.google.javascript.jscomp">JSModule</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#getModule()">getModule</a></strong>()</code>
<div class="block">Gets the current input module.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/Scope.html" title="class in com.google.javascript.jscomp">Scope</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#getScope()">getScope</a></strong>()</code>
<div class="block">Gets the current scope.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#getScopeRoot()">getScopeRoot</a></strong>()</code>
<div class="block">Returns the current scope's root.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#getSourceName()">getSourceName</a></strong>()</code>
<div class="block">Gets the current input source name.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#hasScope()">hasScope</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/JSError.html" title="class in com.google.javascript.jscomp">JSError</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#makeError(com.google.javascript.rhino.Node, com.google.javascript.jscomp.CheckLevel, com.google.javascript.jscomp.DiagnosticType, java.lang.String...)">makeError</a></strong>(<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;n,
         <a href="../../../../com/google/javascript/jscomp/CheckLevel.html" title="enum in com.google.javascript.jscomp">CheckLevel</a>&nbsp;level,
         <a href="../../../../com/google/javascript/jscomp/DiagnosticType.html" title="class in com.google.javascript.jscomp">DiagnosticType</a>&nbsp;type,
         java.lang.String...&nbsp;arguments)</code>
<div class="block">Creates a JSError during NodeTraversal.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/JSError.html" title="class in com.google.javascript.jscomp">JSError</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#makeError(com.google.javascript.rhino.Node, com.google.javascript.jscomp.DiagnosticType, java.lang.String...)">makeError</a></strong>(<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;n,
         <a href="../../../../com/google/javascript/jscomp/DiagnosticType.html" title="class in com.google.javascript.jscomp">DiagnosticType</a>&nbsp;type,
         java.lang.String...&nbsp;arguments)</code>
<div class="block">Creates a JSError during NodeTraversal.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#report(com.google.javascript.rhino.Node, com.google.javascript.jscomp.DiagnosticType, java.lang.String...)">report</a></strong>(<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;n,
      <a href="../../../../com/google/javascript/jscomp/DiagnosticType.html" title="class in com.google.javascript.jscomp">DiagnosticType</a>&nbsp;diagnosticType,
      java.lang.String...&nbsp;arguments)</code>
<div class="block">Reports a diagnostic (error or warning)</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#traverse(com.google.javascript.jscomp.AbstractCompiler, com.google.javascript.rhino.Node, com.google.javascript.jscomp.NodeTraversal.Callback)">traverse</a></strong>(<a href="../../../../com/google/javascript/jscomp/AbstractCompiler.html" title="class in com.google.javascript.jscomp">AbstractCompiler</a>&nbsp;compiler,
        <a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;root,
        <a href="../../../../com/google/javascript/jscomp/NodeTraversal.Callback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.Callback</a>&nbsp;cb)</code>
<div class="block">Traverses a node recursively.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#traverse(com.google.javascript.rhino.Node)">traverse</a></strong>(<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;root)</code>
<div class="block">Traverses a parse tree recursively.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#traverseChangedFunctions(com.google.javascript.jscomp.AbstractCompiler, com.google.javascript.jscomp.NodeTraversal.FunctionCallback)">traverseChangedFunctions</a></strong>(<a href="../../../../com/google/javascript/jscomp/AbstractCompiler.html" title="class in com.google.javascript.jscomp">AbstractCompiler</a>&nbsp;compiler,
                        <a href="../../../../com/google/javascript/jscomp/NodeTraversal.FunctionCallback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.FunctionCallback</a>&nbsp;callback)</code>
<div class="block">Traversal for passes that work only on changed functions.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#traverseInnerNode(com.google.javascript.rhino.Node, com.google.javascript.rhino.Node, com.google.javascript.jscomp.Scope)">traverseInnerNode</a></strong>(<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;node,
                 <a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;parent,
                 <a href="../../../../com/google/javascript/jscomp/Scope.html" title="class in com.google.javascript.jscomp">Scope</a>&nbsp;refinedScope)</code>
<div class="block">Traverses an inner node recursively with a refined scope.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#traverseRoots(com.google.javascript.jscomp.AbstractCompiler, java.util.List, com.google.javascript.jscomp.NodeTraversal.Callback)">traverseRoots</a></strong>(<a href="../../../../com/google/javascript/jscomp/AbstractCompiler.html" title="class in com.google.javascript.jscomp">AbstractCompiler</a>&nbsp;compiler,
             java.util.List&lt;<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&gt;&nbsp;roots,
             <a href="../../../../com/google/javascript/jscomp/NodeTraversal.Callback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.Callback</a>&nbsp;cb)</code>
<div class="block">Traverses a list of node trees.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#traverseRoots(com.google.javascript.jscomp.AbstractCompiler, com.google.javascript.jscomp.NodeTraversal.Callback, com.google.javascript.rhino.Node...)">traverseRoots</a></strong>(<a href="../../../../com/google/javascript/jscomp/AbstractCompiler.html" title="class in com.google.javascript.jscomp">AbstractCompiler</a>&nbsp;compiler,
             <a href="../../../../com/google/javascript/jscomp/NodeTraversal.Callback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.Callback</a>&nbsp;cb,
             <a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>...&nbsp;roots)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#traverseRoots(java.util.List)">traverseRoots</a></strong>(java.util.List&lt;<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&gt;&nbsp;roots)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/NodeTraversal.html#traverseRoots(com.google.javascript.rhino.Node...)">traverseRoots</a></strong>(<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>...&nbsp;roots)</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="NODE_TRAVERSAL_ERROR">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>NODE_TRAVERSAL_ERROR</h4>
<pre>public static final&nbsp;<a href="../../../../com/google/javascript/jscomp/DiagnosticType.html" title="class in com.google.javascript.jscomp">DiagnosticType</a> NODE_TRAVERSAL_ERROR</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="NodeTraversal(com.google.javascript.jscomp.AbstractCompiler, com.google.javascript.jscomp.NodeTraversal.Callback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NodeTraversal</h4>
<pre>public&nbsp;NodeTraversal(<a href="../../../../com/google/javascript/jscomp/AbstractCompiler.html" title="class in com.google.javascript.jscomp">AbstractCompiler</a>&nbsp;compiler,
             <a href="../../../../com/google/javascript/jscomp/NodeTraversal.Callback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.Callback</a>&nbsp;cb)</pre>
<div class="block">Creates a node traversal using the specified callback interface.</div>
</li>
</ul>
<a name="NodeTraversal(com.google.javascript.jscomp.AbstractCompiler, com.google.javascript.jscomp.NodeTraversal.Callback, com.google.javascript.jscomp.ScopeCreator)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>NodeTraversal</h4>
<pre>public&nbsp;NodeTraversal(<a href="../../../../com/google/javascript/jscomp/AbstractCompiler.html" title="class in com.google.javascript.jscomp">AbstractCompiler</a>&nbsp;compiler,
             <a href="../../../../com/google/javascript/jscomp/NodeTraversal.Callback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.Callback</a>&nbsp;cb,
             com.google.javascript.jscomp.ScopeCreator&nbsp;scopeCreator)</pre>
<div class="block">Creates a node traversal using the specified callback interface
 and the scope creator.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="traverse(com.google.javascript.rhino.Node)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>traverse</h4>
<pre>public&nbsp;void&nbsp;traverse(<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;root)</pre>
<div class="block">Traverses a parse tree recursively.</div>
</li>
</ul>
<a name="traverseRoots(com.google.javascript.rhino.Node...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>traverseRoots</h4>
<pre>public&nbsp;void&nbsp;traverseRoots(<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>...&nbsp;roots)</pre>
</li>
</ul>
<a name="traverseRoots(java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>traverseRoots</h4>
<pre>public&nbsp;void&nbsp;traverseRoots(java.util.List&lt;<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&gt;&nbsp;roots)</pre>
</li>
</ul>
<a name="traverseInnerNode(com.google.javascript.rhino.Node, com.google.javascript.rhino.Node, com.google.javascript.jscomp.Scope)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>traverseInnerNode</h4>
<pre>protected&nbsp;void&nbsp;traverseInnerNode(<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;node,
                     <a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;parent,
                     <a href="../../../../com/google/javascript/jscomp/Scope.html" title="class in com.google.javascript.jscomp">Scope</a>&nbsp;refinedScope)</pre>
<div class="block">Traverses an inner node recursively with a refined scope. An inner node may
 be any node with a non <code>null</code> parent (i.e. all nodes except the
 root).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the node to traverse</dd><dd><code>parent</code> - the node's parent, it may not be <code>null</code></dd><dd><code>refinedScope</code> - the refined scope of the scope currently at the top of
     the scope stack or in trivial cases that very scope or <code>null</code></dd></dl>
</li>
</ul>
<a name="getCompiler()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCompiler</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/AbstractCompiler.html" title="class in com.google.javascript.jscomp">AbstractCompiler</a>&nbsp;getCompiler()</pre>
</li>
</ul>
<a name="getLineNumber()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLineNumber</h4>
<pre>public&nbsp;int&nbsp;getLineNumber()</pre>
<div class="block">Gets the current line number, or zero if it cannot be determined. The line
 number is retrieved lazily as a running time optimization.</div>
</li>
</ul>
<a name="getSourceName()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSourceName</h4>
<pre>public&nbsp;java.lang.String&nbsp;getSourceName()</pre>
<div class="block">Gets the current input source name.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>A string that may be empty, but not null</dd></dl>
</li>
</ul>
<a name="getInput()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInput</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/CompilerInput.html" title="class in com.google.javascript.jscomp">CompilerInput</a>&nbsp;getInput()</pre>
<div class="block">Gets the current input source.</div>
</li>
</ul>
<a name="getModule()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getModule</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/JSModule.html" title="class in com.google.javascript.jscomp">JSModule</a>&nbsp;getModule()</pre>
<div class="block">Gets the current input module.</div>
</li>
</ul>
<a name="getCurrentNode()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentNode</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;getCurrentNode()</pre>
<div class="block">Returns the node currently being traversed.</div>
</li>
</ul>
<a name="traverseChangedFunctions(com.google.javascript.jscomp.AbstractCompiler, com.google.javascript.jscomp.NodeTraversal.FunctionCallback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>traverseChangedFunctions</h4>
<pre>public static&nbsp;void&nbsp;traverseChangedFunctions(<a href="../../../../com/google/javascript/jscomp/AbstractCompiler.html" title="class in com.google.javascript.jscomp">AbstractCompiler</a>&nbsp;compiler,
                            <a href="../../../../com/google/javascript/jscomp/NodeTraversal.FunctionCallback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.FunctionCallback</a>&nbsp;callback)</pre>
<div class="block">Traversal for passes that work only on changed functions.
 Suppose a loopable pass P1 uses this traversal.
 Then, if a function doesn't change between two runs of P1, it won't look at
 the function the second time.
 (We're assuming that P1 runs to a fixpoint, o/w we may miss optimizations.)

 Most changes are reported with calls to Compiler.reportCodeChange(), which
 doesn't know which scope changed. We keep track of the current scope by
 calling Compiler.setScope inside pushScope and popScope.
 The automatic tracking can be wrong in rare cases when a pass changes scope
 w/out causing a call to pushScope or popScope. It's very hard to find the
 places where this happens unless a bug is triggered.
 Passes that do cross-scope modifications call
 Compiler.reportChangeToEnclosingScope(Node n).</div>
</li>
</ul>
<a name="traverse(com.google.javascript.jscomp.AbstractCompiler, com.google.javascript.rhino.Node, com.google.javascript.jscomp.NodeTraversal.Callback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>traverse</h4>
<pre>public static&nbsp;void&nbsp;traverse(<a href="../../../../com/google/javascript/jscomp/AbstractCompiler.html" title="class in com.google.javascript.jscomp">AbstractCompiler</a>&nbsp;compiler,
            <a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;root,
            <a href="../../../../com/google/javascript/jscomp/NodeTraversal.Callback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.Callback</a>&nbsp;cb)</pre>
<div class="block">Traverses a node recursively.</div>
</li>
</ul>
<a name="traverseRoots(com.google.javascript.jscomp.AbstractCompiler, java.util.List, com.google.javascript.jscomp.NodeTraversal.Callback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>traverseRoots</h4>
<pre>public static&nbsp;void&nbsp;traverseRoots(<a href="../../../../com/google/javascript/jscomp/AbstractCompiler.html" title="class in com.google.javascript.jscomp">AbstractCompiler</a>&nbsp;compiler,
                 java.util.List&lt;<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&gt;&nbsp;roots,
                 <a href="../../../../com/google/javascript/jscomp/NodeTraversal.Callback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.Callback</a>&nbsp;cb)</pre>
<div class="block">Traverses a list of node trees.</div>
</li>
</ul>
<a name="traverseRoots(com.google.javascript.jscomp.AbstractCompiler, com.google.javascript.jscomp.NodeTraversal.Callback, com.google.javascript.rhino.Node...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>traverseRoots</h4>
<pre>public static&nbsp;void&nbsp;traverseRoots(<a href="../../../../com/google/javascript/jscomp/AbstractCompiler.html" title="class in com.google.javascript.jscomp">AbstractCompiler</a>&nbsp;compiler,
                 <a href="../../../../com/google/javascript/jscomp/NodeTraversal.Callback.html" title="interface in com.google.javascript.jscomp">NodeTraversal.Callback</a>&nbsp;cb,
                 <a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>...&nbsp;roots)</pre>
</li>
</ul>
<a name="getEnclosingFunction()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEnclosingFunction</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;getEnclosingFunction()</pre>
<div class="block">Examines the functions stack for the last instance of a function node.</div>
</li>
</ul>
<a name="getScope()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getScope</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/Scope.html" title="class in com.google.javascript.jscomp">Scope</a>&nbsp;getScope()</pre>
<div class="block">Gets the current scope.</div>
</li>
</ul>
<a name="getControlFlowGraph()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getControlFlowGraph</h4>
<pre>public&nbsp;com.google.javascript.jscomp.ControlFlowGraph&lt;<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&gt;&nbsp;getControlFlowGraph()</pre>
<div class="block">Gets the control flow graph for the current JS scope.</div>
</li>
</ul>
<a name="getScopeRoot()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getScopeRoot</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;getScopeRoot()</pre>
<div class="block">Returns the current scope's root.</div>
</li>
</ul>
<a name="hasScope()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasScope</h4>
<pre>public&nbsp;boolean&nbsp;hasScope()</pre>
</li>
</ul>
<a name="report(com.google.javascript.rhino.Node, com.google.javascript.jscomp.DiagnosticType, java.lang.String...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>report</h4>
<pre>public&nbsp;void&nbsp;report(<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;n,
          <a href="../../../../com/google/javascript/jscomp/DiagnosticType.html" title="class in com.google.javascript.jscomp">DiagnosticType</a>&nbsp;diagnosticType,
          java.lang.String...&nbsp;arguments)</pre>
<div class="block">Reports a diagnostic (error or warning)</div>
</li>
</ul>
<a name="makeError(com.google.javascript.rhino.Node, com.google.javascript.jscomp.CheckLevel, com.google.javascript.jscomp.DiagnosticType, java.lang.String...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>makeError</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/JSError.html" title="class in com.google.javascript.jscomp">JSError</a>&nbsp;makeError(<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;n,
                <a href="../../../../com/google/javascript/jscomp/CheckLevel.html" title="enum in com.google.javascript.jscomp">CheckLevel</a>&nbsp;level,
                <a href="../../../../com/google/javascript/jscomp/DiagnosticType.html" title="class in com.google.javascript.jscomp">DiagnosticType</a>&nbsp;type,
                java.lang.String...&nbsp;arguments)</pre>
<div class="block">Creates a JSError during NodeTraversal.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>n</code> - Determines the line and char position within the source file name</dd><dd><code>type</code> - The DiagnosticType</dd><dd><code>arguments</code> - Arguments to be incorporated into the message</dd></dl>
</li>
</ul>
<a name="makeError(com.google.javascript.rhino.Node, com.google.javascript.jscomp.DiagnosticType, java.lang.String...)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>makeError</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/JSError.html" title="class in com.google.javascript.jscomp">JSError</a>&nbsp;makeError(<a href="../../../../com/google/javascript/rhino/Node.html" title="class in com.google.javascript.rhino">Node</a>&nbsp;n,
                <a href="../../../../com/google/javascript/jscomp/DiagnosticType.html" title="class in com.google.javascript.jscomp">DiagnosticType</a>&nbsp;type,
                java.lang.String...&nbsp;arguments)</pre>
<div class="block">Creates a JSError during NodeTraversal.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>n</code> - Determines the line and char position within the source file name</dd><dd><code>type</code> - The DiagnosticType</dd><dd><code>arguments</code> - Arguments to be incorporated into the message</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/google/javascript/jscomp/MessageFormatter.html" title="interface in com.google.javascript.jscomp"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/google/javascript/jscomp/NodeTraversal.AbstractNodeTypePruningCallback.html" title="class in com.google.javascript.jscomp"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/google/javascript/jscomp/NodeTraversal.html" target="_top">Frames</a></li>
<li><a href="NodeTraversal.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
